
<!--<script>
  import { listContract} from "@/api/home/contract";
  import {rentInstallList} from "../../../api/jinrong/rzsqcx";

  export default {
    name: "Contract",
    data() {
      return {

        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,

        // 【请填写功能名称】表格数据
        contractList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 查询参数
        queryParams: {
          pageNum: 1,
          pageSize: 10,
          sfContractNo: null,
          premiseName: null,
          ownerName: null,
          conInfoTime: null,
          leaseEndTime: null,
        },
        // 表单参数
        form: {
          sfContractNo: null,
          premiseName: null,
          ownerName: null,
          conInfoTime: null,
          leaseEndTime: null,
        },
      };
    },
    created() {
      this.getList();
    },

  };
</script>-->




<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="申请类型" prop="houseType">
      <el-select v-model="queryParams.jrProductType" placeholder="请选择" clearable size="small">
        <el-option label="请选择" value="" />
        <el-option label="申请中" value="1" />
        <el-option label="初审通过" value="2" />
        <el-option label="初审不通过" value="3" />
        <el-option label="复审通过" value="4" />
        <el-option label="复审不通过" value="5" />
      </el-select>
    </el-form-item>

      <el-form-item label="房源类型" prop="houseType">
        <el-select v-model="queryParams.applyState" placeholder="请选择" clearable size="small">
          <el-option label="请选择" value="" />
          <el-option label="租房分期" value="1" />
          <el-option label="收房贷" value="2" />
          <el-option label="应收租约保理" value="3" />
        </el-select>
      </el-form-item>

      <el-form-item label="合同录入时间" prop="conInfoTime" label-width="30">
        <el-date-picker clearable size="small"
                        v-model="queryParams.startDate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="选择合同录入时间，">
        </el-date-picker>
        至
        <el-date-picker clearable size="small"
                        v-model="queryParams.endDate"
                        type="date"
                        value-format="yyyy-MM-dd"
                        placeholder="选择合同录入时间，">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="getList" >搜索</el-button>

        <el-button type="primary" icon="el-icon-refresh" plain>重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">

      <el-table v-loading="loading" :data="contractList">
        <el-table-column label="申请合同号" align="center" prop="applyOrderNo" />
        <el-table-column label="贷款信息" align="center" prop="loanMessage" />
        <el-table-column label="申请类型" align="center" prop="jrProductType" >
          <template slot-scope="scope">
            <span v-for=" s in paystasus1" v-if="scope.row.applyState==s.id">{{s.name}}</span>
          </template>
        </el-table-column>
        <el-table-column label="借款金额" align="center" prop="loanAmount" width="180">
          <template slot-scope="scope">
            {{scope.row.loanAmount}}元
          </template>
        </el-table-column>
        <el-table-column label="借款期限" align="center" prop="monthLimit" width="180">
          <template slot-scope="scope">
            {{scope.row.monthLimit}}月
          </template>
        </el-table-column>

        <el-table-column label="申请日期" align="center" prop="createTime" width="180">

        </el-table-column>
        <el-table-column label="资金方" align="center" prop="companyName" width="180">

        </el-table-column>
        <el-table-column label="申请状态" align="center" prop="applyState" >
          <template slot-scope="scope">
            <span v-for=" s in paystasus" v-if="scope.row.applyState==s.id">{{s.name}}</span>
          </template>
        </el-table-column>
        <el-table-column label="驳回原因" align="center" prop="auditMemo" />
      </el-table>



      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </el-row>
  </div>
</template>

<script>
  import {rentInstallList} from "../../../api/jinrong/rzsqcx";

  export default {
        name: "list",
        data() {
            return {
              // 遮罩层
              loading: true,
              //付款状态 1:未收款 2：已收款 3：已中止
              paystasus:[
                {id:1,name:":申请中"},{id:2,name:"初审通过"},{id:3,name:"初审不通过"},{id:4,name:"复审通过"},{id:5,name:"复审不通过"}
              ],
              paystasus1:[
                {id:1,name:":租房分期"},{id:2,name:"收房贷"},{id:3,name:"应收租约保理"}
              ],
              // 总条数
              total: 0,
              // 显示搜索条件
              showSearch: true,

              contractList:[],
              // 查询参数
              queryParams: {
                pageNum: 1,
                pageSize: 10,
                jrProductType:null,
                applyState:null,
                startDate:null,
                endDate:null

              }
            }
        },

    methods: {
      /** 查询【请填写功能名称】列表 */
      getList() {
        this.loading = true;
        rentInstallList(this.queryParams).then(response => {
          console.log(JSON.stringify(response))
          this.contractList = response.rows;
          this.total = response.total;
          this.loading = false;
        });
      },
      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.resetForm("queryForm");
        this.handleQuery();
      }
    }
        ,
            mounted() {
          this.getList();
            }
        }
</script>

<style scoped>

</style>
